package org.onionframework.persistence.query.projection;

/**
 * 投影类型
 * @author Allan
 *
 */
public enum ProjectionType {

	group,
	max,
	min,
	rowCount,
	count,
	id,
	avg,
	distinct,
	countDistinct,
	property,
	sum,
	datePart,
	dateString,
	rowsConcat;
	
	public String getAlias(String property){
		switch(this){
			case property:
				return property + "_";
			case rowCount:
				return "rowCount";
			default:
				return property + "_" + this.name();
		}
	}
}
